#!/usr/bin/env python3
# _*_coding:utf-8_*_
# cockroach
# email:donnie.fan@foxmail.com

class Course(object):
    # def __init__(self,name,period,outline):
    course_name = "Python 自动化"
    period = "7m"
    outline = "sadfsadfsadf"

class SchoolMember(object):
    members =0
    def __init__(self,name,age,sex):
        self.name = name
        self.age = age
        self.sex = sex

        SchoolMember.members +=1
        print("初始化了一个新的学校成员 %s" % SchoolMember.members)

    def tell(self):
        info = '''
        -------info of %s -------
        name: %s
        age : %s
        sex : %s
        ''' % (self.name,self.name,self.age,self.sex)
        print(info)

class Teacher(SchoolMember):
    def __init__(self,name,age,sex,salary):
        SchoolMember.__init__(self,name,age,sex)
        self.salary = salary

    def teaching(self,course):
        print("%s is teaching %s" %(self.name,course))


    pass


class Student(SchoolMember,Course):
    def __init__(self,name,age,sex,grade):
        SchoolMember.__init__(self,name,age,sex)
        self.grade = grade

    def pay_tuition(self,amount):
        self.paid_tuition = amount
        print("stduent %s has paid tution amount %s" %(self.name,amount))

t = Teacher("Alex",22,"F",3000)

# print(t.name)
# print(t.age)
# print(t.sex)
# print(t.salary)


s = Student("liuhao",23,"M","pys16")
s1 = Student("yanshuai",33,"F","pys26")


s.tell()
s1.tell()
t.tell()

t.teaching("python")

s.pay_tuition(10000)

print(SchoolMember.members)

print(s.course_name,s.outline)